package com.jwgf.shell;

import android.util.Log;

/**
 * Created by Jacky on 2016/8/16.
 */
public class ShellCommandExecutor {

    public boolean shellSync(String shellCmd) {
        boolean ret = false;
        SocketClient client = new SocketClient();
        client.connect();
        client.sendMessageToServer(shellCmd);

        String serverMsg;
        while ((serverMsg = client.getServerMessage()) != null) {
            Log.i("Shell", serverMsg);
            ret =  true;
        }
        client.close();
        return ret;
    }
}
